package bussines
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	
	import vo.User;
	
	public class LoginDelegate
	{
		
		private var responder:IResponder;
		private var service:Object;
		public function LoginDelegate(responder:IResponder)
		{
			this.service = ServiceLocator.getInstance().getRemoteObject("remoteService");
			this.responder = responder;
		}
		
		public function login(user:User):void{
			var token:AsyncToken = service.login(user);
			token.addResponder(responder);
		}

	}
}